package cn.com.mr01.lianxi.mr_lianxi_16;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.Iterator;
import java.util.List;
import java.util.regex.Pattern;

import org.apache.hadoop.io.Text;

import com.google.common.collect.Lists;

public class Test {

	public static void main(String[] args) {

		// Pattern pattern = Pattern.compile("^[-\\+]?[\\d]*$");
		// System.out.println(pattern.matcher("9001").matches());
		// String s = "This is my oraginal string";
		// String s1 = s.substring(2);
		// System.out.println(s1);

		// List<String> list = Arrays.asList("a", "b", "c", "d");
		// Iterator<String> it = list.iterator();
		// while(it.hasNext()){
		// it.next();
		// }
		// it = list.iterator();
		// while(it.hasNext()){
		// System.out.println(it.next());
		// }
		List<Integer> intLists = new ArrayList<Integer>(Arrays.asList(1, 2, 3,
				4, 5, 6, 7, 8));
		Iterator<Integer> values = intLists.iterator();
		List<Integer> list = Lists.newArrayList(values);
		System.out.println(list.get(7));
	}

}
